package com.wavecoler.coach.objects;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class RelationNode {
	
	//Attributes
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key relationNodeID;
	
	@Persistent
	private Node node; //este es el que lo liga al nodo de relacion

	@Persistent
	private String cardinality; 
	
	@Persistent
	private boolean dependency;
	
	@Persistent
	private String entityWaveId; //este es el la entidad que se relaciona


	//Getters and Setters
	public Key getRelationNodeID() {
		return relationNodeID;
	}

	public void setRelationNodeID(Key relationNodeID) {
		this.relationNodeID = relationNodeID;
	}

	public Node getNode() {
		return node;
	}

	public void setNode(Node node) {
		this.node = node;
	}

	public String getCardinality() {
		return cardinality;
	}

	public void setCardinality(String cardinality) {
		this.cardinality = cardinality;
	}

	public boolean isDependency() {
		return dependency;
	}

	public void setDependency(boolean dependency) {
		this.dependency = dependency;
	}
	
	public String getEntity() {
		return entityWaveId;
	}

	public void setEntity(String entityWaveId) {
		this.entityWaveId = entityWaveId;
	}
	
	//Constructors
	public RelationNode(Node node, String entityWaveId) {
		this.node = node;
		this.entityWaveId = entityWaveId;
	}
	
	public RelationNode() {
		super();
	}
	
	
	
	
}
